package dao.impl;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import dao.ShowLeaveMessageDao;
import entity.Product_Comment;
import util.C3P0Util;

public class ShowLeaveMessageDaoImpl implements ShowLeaveMessageDao {

	@Override
	public List<Product_Comment> getAllWithoutList() {
		QueryRunner qr = new QueryRunner(C3P0Util.getDataSource());	
		String sql="select * from product_comment ";
		List<Product_Comment> list = null;
		
		try {
			list=qr.query(sql, new BeanListHandler<Product_Comment>(Product_Comment.class));
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	 
		return list;
	}

	@Override
	public Integer getRows(HashMap<String, String> map) {
		// TODO Auto-generated method stub
		return null;
	}

}
